import 'package:Sayagh/Configs.dart';
import 'package:Sayagh/Drawer.dart';
import 'package:Sayagh/i18n/i18nLocale.dart';
import 'package:Sayagh/tablepress/Cities.dart';
import 'package:Sayagh/tablepress/goods/Goods.dart';
import 'package:flutter/material.dart';

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      floatingActionButton: FloatingActionButton(
        child: Icon(Icons.update),
        onPressed: () {
          updateDrawerGoodsDb()
              .catchError((onError) => print(onError))
              .then((onValue) {
            print("goolds updated");
          });
          updateDrawerCitiesDb();

//          Navigator.push(
//            context,
//            MaterialPageRoute(builder: (context) => InoChiMigi()),
//          );
        },
// onPressed: () => Navigator.push(
//            context,
//            MaterialPageRoute(builder: (context) => ShowTable("بندرعباس","essentials",
//            hasCategoryColumn: 6,
//            )),
//          ),

//        onPressed: () => /home/saeb/App/Android/android-studio/bin/studio.sh
//inoChiMigi(),
      ),
      appBar: AppBar(
        title: asnafHeader,
        centerTitle: false,
      ),
      drawer: DrawerSayagh(),
      body: Goods(
          sayaghWebsite, 'essentionals', i18nLocale[ourLocale]['essentials']),
    );
  }
}
